Added test project and moved to Microsoft.CodeAnalysis v1.0.0#67
Added test project and moved to Microsoft.CodeAnalysis v1.0.0#67
Conversation
We need to do this in order to use Roslyn's test framework. We also needed to add a reference to MEF 2 (Microsoft.Composition) which isn't yet distributed via .NET.
We don't need to be signing these things as we're not working with anyone else's internals.
There was a problem hiding this comment.
var walker = SourceBrowser.Generator.DocumentWalkers.WalkerSelector.GetWalker(fm, document, linkProvider);
Also, make SourceBrowser.Generator.DocumentWalkers.WalkerSelector a public class
Apply this change to other tests
|
MSBuildWorkspaceTestClass looks really handy. Good job! 😄 I tried integrating this with Marcin's PR #70 but the checked out pull request branches are read only (which means that only he can adapt his code to this merge). Is it ok if we merge #70 first? Then we need to do the following:
|
|
You can add |
|
Yeah, we'll just use InternalsVisibleTo and make WalkerSelector internal instead of private. |
This will fix #11 and from now on we should be adding tests when fixing generator bugs such as #17 and #64.
I've used Kirill Osenkov's
MSBuildWorkspaceTestBaseclass. You can see how they're using it internally here: http://source.roslyn.codeplex.com/#Roslyn.Services.UnitTests/WorkspaceTests/MSBuildWorkspaceTests.cs,148It seems like a nice approach to quickly and easily create solutions without having to write a ton of boilerplate code.
This new version of Microsoft.CodeAnalysis depends on MEF 2 which is the
Microsoft.Compositionpackage on NuGet.I still have to write tests for parameters and locals and will do so after #66 is merged.